/********************************************************************
	Created:	2011/02/22    13:47 
	Filename: 	Component.h
	Author:		falconwang
*********************************************************************/

#ifndef Component_H__
#define Component_H__

#include <string>

namespace Ent
{
	class Entity;

	class Component
	{
	public:

		Component(const std::string& _family, const std::string& _className);
		~Component();

		Component*	Clone() const;

		void		OnAttach(Entity* _entity);
		void		OnDetach(Entity* _entity);
		void		OnFinalize();
		void		OnUpdate(float delta);

		Entity*		GetEntity() { return m_Entity; }

		const std::string& GetFamily() const { return m_Family; }

		const std::string& GetClassName() const { return m_ClassName; }

	private:

		Component(const Component& _other);

	private:

		Entity*			m_Entity;
		std::string  	m_Family;
		std::string		m_ClassName;
	};
}

#endif // Component_H__